﻿using System.Windows.Input;
using System.Windows.Media.Animation;
using PomodoroMinutes.Models;

namespace PomodoroMinutes
{
	public partial class MainWindow
	{
		public MainWindow()
		{
			InitializeComponent();
		}

		private void DraggingWindow(object sender, MouseButtonEventArgs e)
		{
			if(e.LeftButton == MouseButtonState.Pressed)
			{
				DragMove();
			}
		}

		private void RegisterDisturbance(object sender, MouseButtonEventArgs e)
		{
			var model = ((MinutesViewModel)DataContext);
			model.AddDisturbanceCommand.Execute(null);

			if (model.DisturbanceCount != 1) return;
			var showNumberTag = (Storyboard)FindResource("ShowNumberTag");
			showNumberTag.Begin(this);
		}
	}
}
